package com.kongge.viewdisplayframeworklib.event.action;

import com.kongge.viewdisplayframeworklib.util.EQConstans;

public class EQGotoFrameAction extends EQAction {

	// ~常量区块
	// ========================================================
	public static final int NO_ANIMATION = -1;         // 没有动画
	public static final int ANIMATION_CLOCKWISE = 1;        // 顺时针动画
	public static final int ANIMATION_COUNTER_CLOCKWISE = 2;    // 逆时针动画
	
	protected int mGotoFrameId;  // 要切换的FrameId
	protected int mTabIndex = EQConstans.INVALID_INDEX;
	private boolean mIsNeedRequest = true;  // 页面显示时，是否要请求数据
	
	private boolean mIsReplaceOld = false;  // 是否替换原有的
	private boolean mIsRuningInUIThread = true;
	private int animationType = NO_ANIMATION;

	// ~成员变量区块
	// ========================================================

	// ~构造函数区块
	// ========================================================
	public EQGotoFrameAction(int sysEventType, int gotoFrameId) {
		super(sysEventType);
		mGotoFrameId = gotoFrameId;
		// TODO Auto-generated constructor stub
	}
	
	public EQGotoFrameAction(int sysEventType, int gotoFrameId, boolean isNeedRequest) {
		super(sysEventType);
		mGotoFrameId = gotoFrameId;
		mIsNeedRequest = isNeedRequest;
	}

	// ~方法区块
	// ========================================================
	/**
	 * 是否需要请求数据
	 * @return
	 */
	public boolean isNeedRequest() {
		return mIsNeedRequest;
	}
	
	public int getGotoFrameId() {
		return mGotoFrameId;
	}
	
	public void setTabIndex(int tabIndex) {
		mTabIndex = tabIndex;
	}
	
	public int getGotoTabIndex() {
		return mTabIndex;
	}
	
	public boolean isRuningInUIThead() {
		return mIsRuningInUIThread;
	}
	
	public void setRuningInUIThread(boolean isRuningInUIThead) {
		mIsRuningInUIThread = isRuningInUIThead;
	}
	
	public boolean isReplaceOld() {
		return mIsReplaceOld;
	}
	
	public void setReplaceOld(boolean isReplaceOld) {
		mIsReplaceOld = isReplaceOld;
	}
	
	public void setGotoFrameId(int frameId) {
		mGotoFrameId = frameId;
	}
	
	public int getClassType() {
		return TYPE_ACTION_GOTO_FRAME;
	}
	
	public int getAnimationType() {
		return animationType;
	}
	
	public void setAnimationType(int animationType) {
		this.animationType = animationType;
	}

	// ~静态方法区块
	// ========================================================

	// ~内部接口（类）区块
	// ========================================================

}
